<h4>KARTU HASIL STUDI &raquo; <span class="current_page">LIHAT TRANSKRIP AKADEMIK</span></h4>

            <!-- Begin three column window -->
<div class="onecolumn" style="padding-bottom:20px">
    <div class="header">
    <span>REKAP AKADEMIK MAHASISWA</span>
	</div>
	<br class="clear"/>


<div class="text">
<p>
 <?php if($getDataTranskrip): ?>
 <?php foreach($getDataTranskrip as $transkrip): ?>
 <div class="data_mhs" align="center">
     <table class="uiTableList" cellpadding="5" cellspacing="0" border="0" width="736">
     <tbody>
       <tr align="left">
         <td width="40"><b>Nama</b></td>
         <td width="5">:</td>
         <td width="641"><?php echo strtoupper($transkrip->NAMA) ?></td>
       </tr>
       <tr align="left">
		  <td><b>NIM</b></td>
          <td>:</td>
          <td><?php echo $transkrip->NIM ?></td>
	   </tr>
       </tbody>
      </table>
 </div>
 <?php break; ?>
 <?php endforeach; ?>
 <br />
 <table class="data" align="center" border="1" style="border-color: #333333">
            <tr class="font_white" bgcolor="#000000" align="center">
                <th width="30" height="40">No.</th>
                <th width="80">Kode MK</th>
                <th width="210">Nama MK</th>
                <th width="50">SKS</th>
                <th width="50">Nilai</th>
                <th width="60">N x SKS</th>
                <th width="70">Ditempuh</th>
                <th width="130">Histori Nilai</th>
            </tr>
            <?php $seq_number = 1; ?>
            <?php foreach($getDataTranskripDistinct as $transkrip_distinct): ?>
            <?php $transkrip = $this->akad_model->getViewKhsAllByNim_nilaiTerbaik($this->session->userdata('siamunp_user'),$transkrip_distinct->KODE_MK); ?>
            <?php $histori_nilai = $this->akad_model->getViewKhsAllByKodeMk($this->session->userdata('siamunp_user'),$transkrip_distinct->KODE_MK); ?>
            <?php $countKuliah = $this->akad_model->countViewKhsAllByKodeMk($this->session->userdata('siamunp_user'),$transkrip_distinct->KODE_MK); ?>
            <tr align="center">

              <td height="18" align="right" style="padding-right:5px"><?php echo $seq_number; ?></td>

              <td><?php echo strtoupper($transkrip_distinct->KODE_MK) ?></td>

              <td align="left" style="padding-left:5px"><?php echo $transkrip_distinct->NAMA_MK ?></td>

              <td><?php echo $transkrip_distinct->SKS ?></td>

              <td><?php if($transkrip) echo $transkrip->NILAI; else echo "-";  ?></td>

              <td align="right" style="padding-right:5px">
              <?php if($transkrip): ?>
                <?php $nk = $this->gpa_com->alphabet_to_int_score($transkrip->NILAI) * $transkrip->SKS ?>
                <?php echo number_format($nk, 2, ".", ","); ?>
              <?php else: ?>
                <?php echo "-"; ?>
              <?php endif ?>
              </td>

              <td><?php if($transkrip): ?><?php echo $countKuliah ?><?php else:?>-<?php endif ?></td>

              <td align="left" style="padding-left:5px"><?php $i=0; ?>
              <?php if($histori_nilai): ?>
                <?php foreach($histori_nilai as $value): ?>
                <?php $array[$i] = $value->NILAI ?>
                <?php $i++ ?>
                <?php endforeach ?>
                <?php echo implode(", ", $array) ?> <?php unset($array)?>
              <?php else: ?>
                <?php echo "&nbsp"; ?>
              <?php endif ?>
              </td>

            </tr>
            <?php $seq_number++; ?>
            <?php endforeach; ?>
 </table>
 <br />
 <div style="margin-left:50px">
 <table>
 <tr>
   <td><b>Indeks Prestasi Kumulatif</b></td>
   <td>:</td>
   <td><?php echo $this->gpa_com->ipk_processor(); ?></td>
 </tr>
 </table>
 </div>
 <?php else: ?>
 <div align="center">
  <div style="width:500px">
      <div id="p_messages_error">
        Data Transkrip Akademik tidak tersedia.
      </div>
   </div>
 </div>
 <?php endif; ?>
</p>
<br /><br />

</div>

</div>